package com.it.reggie.Mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.it.reggie.entity.Dish;
import com.it.reggie.entity.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 菜品
 */
@Mapper
public interface DishMapper extends BaseMapper<Dish> {

    @Select("select count(*) from dish where category_id = #{id} ;")
    int queryDishes(Long id);

    @Select("select * from reggie.dish where category_id = #{categoryId}  and status = 1;")
    List<Dish> listMeal(Long categoryId);

}
